package com.li.test.base.jdkproxy;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class Myapp {

    public static void main(String[] args) {
        HelloServiceImpl iHelloService = new HelloServiceImpl();
        MyInvocationHandler MyInvocationHandler = new MyInvocationHandler(iHelloService);
        IHelloService xx=  (IHelloService) Proxy.newProxyInstance(iHelloService.getClass().getClassLoader(),iHelloService.getClass().getInterfaces(),MyInvocationHandler);
        xx.print("");
    }
}
